import request from '@/utils/request'

// 查询店铺分类列表
export function listBusinessClass(query) {
  return request({
    url: '/lkshop/businessClass/list',
    method: 'get',
    params: query
  })
}

// 查询店铺分类层级列表（树形结构）
export function treeListBusinessClass(query) {
  return request({
    url: '/lkshop/businessClass/treeList',
    method: 'get',
    params: query
  })
}

// 获取店铺分类树形结构
export function getBusinessClassTree(query) {
  return request({
    url: '/lkshop/businessClass/tree',
    method: 'get',
    params: query
  })
}

// 查询店铺分类详细
export function getBusinessClass(id) {
  return request({
    url: '/lkshop/businessClass/detail/' + id,
    method: 'get'
  })
}

// 新增店铺分类
export function addBusinessClass(data) {
  return request({
    url: '/lkshop/businessClass',
    method: 'post',
    data: data
  })
}

// 修改店铺分类
export function updateBusinessClass(data) {
  return request({
    url: '/lkshop/businessClass',
    method: 'put',
    data: data
  })
}

// 删除店铺分类
export function delBusinessClass(id) {
  return request({
    url: '/lkshop/businessClass/' + id,
    method: 'delete'
  })
}
